package com.loan.system.create.service.impl;

import com.loan.common.utils.DateUtils;
import com.loan.system.create.domain.AssistPdfSearchJhBase;
import com.loan.system.create.mapper.AssistPdfSearchJhBaseMapper;
import com.loan.system.create.service.IAssistPdfSearchJhBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * JH数据Service业务层处理
 *
 * @author Sophia
 * @date 2024-10-11
 */
@Service
public class AssistPdfSearchJhBaseServiceImpl implements IAssistPdfSearchJhBaseService {
    @Autowired
    private AssistPdfSearchJhBaseMapper assistPdfSearchJhBaseMapper;

    /**
     * 查询JH数据
     *
     * @param id JH数据主键
     * @return JH数据
     */
    @Override
    public AssistPdfSearchJhBase selectAssistPdfSearchJhBaseById(Long id) {
        return assistPdfSearchJhBaseMapper.selectAssistPdfSearchJhBaseById(id);
    }

    /**
     * 查询JH数据列表
     *
     * @param assistPdfSearchJhBase JH数据
     * @return JH数据
     */
    @Override
    public List<AssistPdfSearchJhBase> selectAssistPdfSearchJhBaseList(AssistPdfSearchJhBase assistPdfSearchJhBase) {
        return assistPdfSearchJhBaseMapper.selectAssistPdfSearchJhBaseList(assistPdfSearchJhBase);
    }

    /**
     * 新增JH数据
     *
     * @param assistPdfSearchJhBase JH数据
     * @return 结果
     */
    @Override
    public int insertAssistPdfSearchJhBase(AssistPdfSearchJhBase assistPdfSearchJhBase) {
        assistPdfSearchJhBase.setCreateTime(DateUtils.getNowDate());
        return assistPdfSearchJhBaseMapper.insertAssistPdfSearchJhBase(assistPdfSearchJhBase);
    }

    /**
     * 修改JH数据
     *
     * @param assistPdfSearchJhBase JH数据
     * @return 结果
     */
    @Override
    public int updateAssistPdfSearchJhBase(AssistPdfSearchJhBase assistPdfSearchJhBase) {
        assistPdfSearchJhBase.setUpdateTime(DateUtils.getNowDate());
        return assistPdfSearchJhBaseMapper.updateAssistPdfSearchJhBase(assistPdfSearchJhBase);
    }

    /**
     * 批量删除JH数据
     *
     * @param ids 需要删除的JH数据主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfSearchJhBaseByIds(Long[] ids) {
        return assistPdfSearchJhBaseMapper.deleteAssistPdfSearchJhBaseByIds(ids);
    }

    /**
     * 删除JH数据信息
     *
     * @param id JH数据主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfSearchJhBaseById(Long id) {
        return assistPdfSearchJhBaseMapper.deleteAssistPdfSearchJhBaseById(id);
    }

    @Override
    public Integer insertSearchBaseList(List<AssistPdfSearchJhBase> searchBaseList) {
        return assistPdfSearchJhBaseMapper.insertSearchBaseList(searchBaseList);
    }
}
